//
//  main.cpp
//  SkyF
//
//  Created by Гукун Александр on 1/23/14.
//  Copyright (c) 2014 SNK. All rights reserved.
//

//#import <UIKit/UIKit.h>
//
//#import "AppDelegate.h"

#include <iostream>
#include <GSEngine/GSEngine.h>

int main(int argc, char * argv[])
{
    GSEngine::GSAppDescriptor desc;
    desc.m_width = 1024;
    desc.m_height = 768;
    desc.m_name = "Sky Force";
    
    GSEngine::GSApplication app(argc, argv, desc);
    
    GSEngine::SpriteEntity* sprite = GSEngine::CreateSpriteEntity("data/textures/file.bmp");
    sprite->setName("obj001");
    sprite->setPosition(GSEngine::vec3f(0.0f, -5.0f, 1.0f));
    sprite->setScale(GSEngine::vec3f(3.5f, 1.0f, 1.0f));

    /*
    GSEngine::SpriteEntity* sprite1 = GSEngine::CreateSpriteEntity("data/textures/file.bmp");
    sprite1->setName("obj002");
    sprite1->setPosition(GSEngine::vec3f(0.0f, 0.0f, 1.0f));
    sprite1->setScale(GSEngine::vec3f(3.0f, 3.0f, 1.0f));
    sprite1->setHotSpot(GSEngine::vec3f(1.0f, 0.0f,0.0f));
    */
    GSEngine::ModelEntity* model = GSEngine::CreateModelEntity("data/models/sun.3DS");
    model->setPosition(GSEngine::vec3f(0.0f, 0.0f, -100.0f));
    model->setModelTexture("data/textures/man.bmp");
    model->setRotation(GSEngine::vec3f(5.0f, 0.0f, 0.0f));
    
    GSEngine::SpriteEntity* sprite3 = GSEngine::CreateSpriteEntity("data/textures/file.bmp");
    sprite3->setName("obj003");
    sprite3->setPosition(GSEngine::vec3f(0.0f, 5.0f, 1.0f));
    sprite3->setRotation(GSEngine::vec3f(0.0f, 0.0f, 2.0f));

    sprite3->setShader(GSEngine::EFragmentShader, "data/shaders/fragShader.fsh");
    
    app.start();
    return 0;
}
